﻿<%@ Page Title="Constrain movement" Language="C#" MasterPageFile="~/Demo.master"
    StylesheetTheme="start" Inherits="DemoPage" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Position the cursor while dragging the object. By default the cursor appears in
        the center of the dragged object; use the <b>CursorPosition</b> property to specify another location
        relative to the draggable (specify a pixel value from the top, right, bottom, and/or
        left). Customize the cursor's appearance by supplying the <b>Cursor</b> property with a valid
        CSS cursor value: default, move, pointer, crosshair, etc.
    </div>
    <style type="text/css">
        .draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
    </style>
    <asp:Panel ID="DraggablePanel" runat="server" CssClass="draggable ui-widget-content">
        <p>
            I will always stick to the center (relative to the mouse)</p>
    </asp:Panel>
    <asp:Panel ID="DraggablePanel2" runat="server" CssClass="draggable ui-widget-content">
        <p>
            My cursor is at left -5 and top -5</p>
    </asp:Panel>
    <asp:Panel ID="DraggablePanel3" runat="server" CssClass="ui-widget-content draggable">
        <p>
            My cursor position is only controlled for the 'bottom' value</p>
    </asp:Panel>
    <DotNetAge:Draggable ID="Draggable1" runat="server" Cursor="move">
        <Target TargetID="DraggablePanel" />
        <CursorPosition Left="56" Top="56" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable2" runat="server" Cursor="crosshair">
        <Target TargetID="DraggablePanel2" />
        <CursorPosition Left="-5" Top="-5" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable3" runat="server">
        <Target TargetID="DraggablePanel3" />
        <CursorPosition Bottom="0" />
    </DotNetAge:Draggable>
    <div style="clear: left;">
    </div>
    <br />
    <demo:Code runat="server" ID="codeView" SourceFile="~/Draggable/Codes/CursorStyle.aspx" />
</asp:Content>
